﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    mc:Ignorable="d">

	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="Shared.xaml"/>
	</ResourceDictionary.MergedDictionaries>

	<SolidColorBrush x:Key="HighlightBackgroundBrush" Color="#EEE"/>
	<SolidColorBrush x:Key="HighlightForegroundBrush" Color="Purple"/>
	<SolidColorBrush x:Key="DisabledForegroundBrush" Color="Gray"/>
	<SolidColorBrush x:Key="ForegroundBrush" Color="Black"/>
	<SolidColorBrush x:Key="BackgroundBrush" Color="White"/>
	<Color x:Key="ArrowColor">Silver</Color>

	<Style x:Key="{x:Type Menu}" TargetType="{x:Type Menu}">
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Setter Property="SnapsToDevicePixels" Value="True"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Menu}">
					<Border Background="{StaticResource BackgroundBrush}">
						<StackPanel ClipToBounds="True" 
									Orientation="Horizontal" 
									Margin="0,10,0,10"
									IsItemsHost="True"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style TargetType="{x:Type ContextMenu}">
		<Setter Property="Background" Value="White"/>
		<Setter Property="SnapsToDevicePixels" Value="True"/>
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Setter Property="Grid.IsSharedSizeScope" Value="True"/>
		<Setter Property="HasDropShadow" Value="True"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ContextMenu}">
					<Border x:Name="Border" Background="{StaticResource BackgroundBrush}" BorderThickness="1">
						<Border.BorderBrush>
							<SolidColorBrush Color="{StaticResource BorderMediumColor}"/>
						</Border.BorderBrush>
						<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
					</Border>
					<!--<ControlTemplate.Triggers>
                        <Trigger Property="HasDropShadow" Value="True">
                            <Setter TargetName="Border" Property="Padding" Value="0,3,0,3"/>
                            <Setter TargetName="Border" Property="CornerRadius" Value="4"/>
                        </Trigger>
                    </ControlTemplate.Triggers>-->
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<MenuScrollingVisibilityConverter x:Key="MenuScrollingVisibilityConverter"/>
	<Geometry x:Key="DownArrow">M 0,0 L 3.5,4 L 7,0 Z</Geometry>
	<Geometry x:Key="UpArrow">M 0,4 L 3.5,0 L 7,4 Z</Geometry>
	<Geometry x:Key="RightArrow">M 0,0 L 4,3.5 L 0,7 Z</Geometry>
	<Style x:Key="MenuScrollButton" TargetType="{x:Type RepeatButton}" BasedOn="{x:Null}">
		<Setter Property="ClickMode" Value="Hover"/>
		<Setter Property="MinWidth" Value="0"/>
		<Setter Property="MinHeight" Value="0"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type RepeatButton}">
					<DockPanel Background="{StaticResource BackgroundBrush}" SnapsToDevicePixels="true">
						<Rectangle DockPanel.Dock="Right" x:Name="R1" Width="1" Fill="Transparent"/>
						<Rectangle DockPanel.Dock="Bottom" x:Name="B1" Height="1" Fill="Transparent"/>
						<Rectangle DockPanel.Dock="Left" x:Name="L1" Width="1" Fill="Transparent"/>
						<Rectangle DockPanel.Dock="Top" x:Name="T1" Height="1" Fill="Transparent"/>
						<ContentPresenter x:Name="ContentContainer" Margin="2,2,2,2" VerticalAlignment="Center" HorizontalAlignment="Center"/>
					</DockPanel>
					<ControlTemplate.Triggers>
						<Trigger Property="IsPressed" Value="True">
							<Setter TargetName="R1" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
							<Setter TargetName="B1" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
							<Setter TargetName="L1" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
							<Setter TargetName="T1" Property="Fill" Value="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}"/>
							<Setter TargetName="ContentContainer" Property="Margin" Value="3,3,1,1"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="MenuScrollViewer" TargetType="{x:Type ScrollViewer}" BasedOn="{x:Null}">
		<Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
		<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
		<Setter Property="Template">
			<Setter.Value>
				<!--<SnippetMenuScrollViewer>-->
				<!--ScrollViewer for a MenuItem-->
				<ControlTemplate TargetType="{x:Type ScrollViewer}">
					<Grid SnapsToDevicePixels="True">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="*"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition Height="*"/>
							<RowDefinition Height="Auto"/>
						</Grid.RowDefinitions>
						<Border Grid.Row="1" Grid.Column="0">
							<ScrollContentPresenter Margin="{TemplateBinding Padding}"/>
						</Border>
						<RepeatButton Style="{StaticResource MenuScrollButton}" Grid.Row="0" Grid.Column="0" Command="{x:Static ScrollBar.LineUpCommand}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Focusable="False">
							<RepeatButton.Visibility>
								<MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="0">
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
								</MultiBinding>
							</RepeatButton.Visibility>
							<Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource UpArrow}"/>
						</RepeatButton>
						<RepeatButton Style="{StaticResource MenuScrollButton}" Grid.Row="2" Grid.Column="0" Command="{x:Static ScrollBar.LineDownCommand}" CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Focusable="False">
							<RepeatButton.Visibility>
								<MultiBinding FallbackValue="Visibility.Collapsed" Converter="{StaticResource MenuScrollingVisibilityConverter}" ConverterParameter="100">
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ComputedVerticalScrollBarVisibility"/>
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="VerticalOffset"/>
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ExtentHeight"/>
									<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ViewportHeight"/>
								</MultiBinding>
							</RepeatButton.Visibility>
							<Path Fill="{DynamicResource {x:Static SystemColors.MenuTextBrushKey}}" Data="{StaticResource DownArrow}"/>
						</RepeatButton>
					</Grid>
				</ControlTemplate>
				<!--</SnippetMenuScrollViewer>-->
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
		<Setter Property="Height" Value="1"/>
		<Setter Property="Margin" Value="6,4,6,4"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Separator}">
					<Border BorderThickness="1">
						<Border.BorderBrush>
							<SolidColorBrush Color="#AA444444"/>
						</Border.BorderBrush>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
		<Border x:Name="Border">
			<Grid>
				<ContentPresenter Margin="10,3,6,3" ContentSource="Header" RecognizesAccessKey="True"/>
				<Popup x:Name="Popup" Placement="Bottom" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade">
					<Border x:Name="SubmenuBorder" SnapsToDevicePixels="True" BorderThickness="1" Background="{StaticResource BackgroundBrush}">
						<Border.BorderBrush>
							<SolidColorBrush Color="{DynamicResource BorderMediumColor}"/>
						</Border.BorderBrush>
						<ScrollViewer CanContentScroll="True" Style="{StaticResource MenuScrollViewer}">
							<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
						</ScrollViewer>
					</Border>
				</Popup>
			</Grid>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsSuspendingPopupAnimation" Value="True">
				<Setter TargetName="Popup" Property="PopupAnimation" Value="None"/>
			</Trigger>
			<!--<Trigger SourceName="Popup" Property="AllowsTransparency" Value="True">
                <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0,0,4,4"/>
                <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,0,0,3"/>
            </Trigger>-->
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsEnabled" Value="True">
				<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsHighlighted" Value="True">
				<Setter Property="Background" Value="{StaticResource HighlightBackgroundBrush}" TargetName="Border"/>
				<Setter Property="Foreground" Value="{StaticResource HighlightForegroundBrush}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<ControlTemplate x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}">
		<Border x:Name="Border" Background="{StaticResource BackgroundBrush}">
			<Grid>
				<ContentPresenter Margin="10,3,6,3" ContentSource="Header" RecognizesAccessKey="True"/>
			</Grid>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsEnabled" Value="True">
				<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsHighlighted" Value="True">
				<Setter Property="Background" Value="{StaticResource HighlightBackgroundBrush}" TargetName="Border"/>
				<Setter Property="Foreground" Value="{StaticResource HighlightForegroundBrush}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<ControlTemplate x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}" TargetType="{x:Type MenuItem}">
		<Border x:Name="Border" BorderThickness="1" Background="{StaticResource BackgroundBrush}">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="auto" SharedSizeGroup="Icon"/>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
					<ColumnDefinition Width="13"/>
				</Grid.ColumnDefinitions>
				<ContentPresenter x:Name="Icon" Margin="6,0,6,0" VerticalAlignment="Center" ContentSource="Icon"/>
				<Border x:Name="Check" Width="13" Height="13" Visibility="Collapsed" Margin="10,0,6,0" BorderThickness="1">
					<Path x:Name="CheckMark" Width="7" Height="7" Visibility="Hidden" SnapsToDevicePixels="False" StrokeThickness="2" Data="M 0 0 L 7 7 M 0 7 L 7 0">
						<Path.Stroke>
							<SolidColorBrush Color="{StaticResource ArrowColor}"/>
						</Path.Stroke>
					</Path>
				</Border>
				<ContentPresenter x:Name="HeaderHost" Grid.Column="1" ContentSource="Header" RecognizesAccessKey="True" VerticalAlignment="Center"/>
				<TextBlock x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}" Margin="10,2,0,2" DockPanel.Dock="Right" VerticalAlignment="Center"/>
			</Grid>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="ButtonBase.Command" Value="{x:Null}"/>
			<!--<Trigger Property="Icon" Value="{x:Null}">
                <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
            </Trigger>-->
			<!--<Trigger Property="IsChecked" Value="True">
                <Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
            </Trigger>-->
			<!--<Trigger Property="IsCheckable" Value="True">
                <Setter TargetName="Check" Property="Visibility" Value="Visible"/>
                <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
            </Trigger>-->
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsEnabled" Value="True">
				<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsHighlighted" Value="True">
				<Setter Property="Background" Value="{StaticResource HighlightBackgroundBrush}" TargetName="Border"/>
				<Setter Property="Foreground" Value="{StaticResource HighlightForegroundBrush}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<ControlTemplate x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
		<Border x:Name="Border" BorderThickness="1" Background="{StaticResource BackgroundBrush}">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="auto" SharedSizeGroup="Icon"/>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
					<ColumnDefinition Width="13"/>
				</Grid.ColumnDefinitions>
				<ContentPresenter x:Name="Icon" Margin="6,0,6,0" VerticalAlignment="Center" ContentSource="Icon"/>
				<ContentPresenter x:Name="HeaderHost" Grid.Column="1" ContentSource="Header" RecognizesAccessKey="True" VerticalAlignment="Center"/>
				<TextBlock x:Name="InputGestureText" Grid.Column="2" Text="{TemplateBinding InputGestureText}" Margin="5,2,2,2" DockPanel.Dock="Right" VerticalAlignment="Center"/>
				<Path Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center"  Data="M 0 0 L 0 7 L 4 3.5 Z">
					<Path.Fill>
						<SolidColorBrush Color="{StaticResource ArrowColor}"/>
					</Path.Fill>
				</Path>
				<Popup x:Name="Popup" Placement="Right" HorizontalOffset="-4" IsOpen="{TemplateBinding IsSubmenuOpen}" AllowsTransparency="True" Focusable="False" PopupAnimation="Fade">
					<Border x:Name="SubmenuBorder" SnapsToDevicePixels="True" BorderBrush="Gray" BorderThickness="1" Background="{StaticResource BackgroundBrush}" Padding="1">
						<ScrollViewer CanContentScroll="True" Style="{StaticResource MenuScrollViewer}">
							<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
						</ScrollViewer>
					</Border>
				</Popup>
			</Grid>
		</Border>
		<ControlTemplate.Triggers>
			<!--<Trigger Property="Icon" Value="{x:Null}">
                <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
            </Trigger>-->
			<!--<Trigger SourceName="Popup" Property="AllowsTransparency" Value="True">
                <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="4"/>
                <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3"/>
            </Trigger>-->
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsEnabled" Value="True">
				<Setter Property="Foreground" Value="{StaticResource ForegroundBrush}"/>
			</Trigger>
			<Trigger Property="IsHighlighted" Value="True">
				<Setter Property="Background" Value="{StaticResource HighlightBackgroundBrush}" TargetName="Border"/>
				<Setter Property="Foreground" Value="{StaticResource HighlightForegroundBrush}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
		<Setter Property="OverridesDefaultStyle" Value="True"/>
		<Style.Triggers>
			<Trigger Property="Role" Value="TopLevelHeader">
				<Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}"/>
				<Setter Property="Grid.IsSharedSizeScope" Value="True"/>
			</Trigger>
			<Trigger Property="Role" Value="TopLevelItem">
				<Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}"/>
			</Trigger>
			<Trigger Property="Role" Value="SubmenuHeader">
				<Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
			</Trigger>
			<Trigger Property="Role" Value="SubmenuItem">
				<Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}"/>
			</Trigger>
		</Style.Triggers>
	</Style>
	<Style x:Key="MLB_MenuItem" TargetType="{x:Type MenuItem}">
		<Setter Property="Foreground" Value="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Menu}}}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type MenuItem}">
					<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition x:Name="Col0" MinWidth="17" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
								<ColumnDefinition Width="Auto" SharedSizeGroup="MenuTextColumnGroup"/>
								<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>
								<ColumnDefinition x:Name="Col3" Width="14"/>
							</Grid.ColumnDefinitions>
							<!-- ContentPresenter to show an Icon if needed -->
							<ContentPresenter Grid.Column="0" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
							<!-- Glyph is a checkmark if needed for a checkable menu -->
							<Grid Grid.Column="0" Visibility="Hidden" Margin="4,0,6,0" x:Name="GlyphPanel" VerticalAlignment="Center">
								<Path x:Name="GlyphPanelpath" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,2 L0,4.8 L2.5,7.4 L7.1,2.8 L7.1,0 L2.5,4.6 z" FlowDirection="LeftToRight"/>
							</Grid>
							<!-- Content for the menu text etc -->
							<ContentPresenter Grid.Column="1" Margin="{TemplateBinding Padding}" x:Name="HeaderHost" RecognizesAccessKey="True" ContentSource="Header"/>
							<!-- Content for the menu IGT -->
							<ContentPresenter Grid.Column="2" Margin="8,1,8,1" x:Name="IGTHost" ContentSource="InputGestureText" VerticalAlignment="Center"/>
							<!-- Arrow drawn path which points to the next level of the menu -->
							<Grid Grid.Column="3" Margin="4,0,6,0" x:Name="ArrowPanel" VerticalAlignment="Center">
								<Path x:Name="ArrowPanelPath" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,0 L0,8 L4,4 z"/>
							</Grid>
							<!-- The Popup is the body of the menu which expands down or across depending on the level of the item -->
							<Popup IsOpen="{Binding Path=IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" x:Name="SubMenuPopup" Focusable="false" PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
								<Border x:Name="SubMenuBorder" BorderBrush="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Menu}}}" BorderThickness="1" Padding="2,2,2,2">
									<Grid x:Name="SubMenu" Grid.IsSharedSizeScope="True">
										<!-- StackPanel holds children of the menu. This is set by IsItemsHost=True -->
										<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
									</Grid>
								</Border>
							</Popup>
						</Grid>
					</Border>
					<!-- These triggers re-configure the four arrangements of MenuItem to show different levels of menu via Role -->
					<ControlTemplate.Triggers>
						<!-- Role = TopLevelHeader : this is the root menu item in a menu; the Popup expands down -->
						<Trigger Property="Role" Value="TopLevelHeader">
							<Setter Property="Padding" Value="6,1,6,1"/>
							<Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup"/>
							<Setter Property="MinWidth" Value="0" TargetName="Col0"/>
							<Setter Property="Width" Value="Auto" TargetName="Col3"/>
							<!--<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>-->
							<Setter Property="Visibility" Value="Collapsed" TargetName="GlyphPanel"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="IGTHost"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
						</Trigger>
						<!-- Role = TopLevelItem :  this is a child menu item from the top level without any child items-->
						<Trigger Property="Role" Value="TopLevelItem">
							<Setter Property="Padding" Value="6,1,6,1"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
						</Trigger>
						<!-- Role = SubMenuHeader : this is a child menu item which does not have children -->
						<Trigger Property="Role" Value="SubmenuHeader">
							<Setter Property="DockPanel.Dock" Value="Top"/>
							<Setter Property="Padding" Value="0,2,0,2"/>
						</Trigger>
						<!-- Role = SubMenuItem : this is a child menu item which has children-->
						<Trigger Property="Role" Value="SubmenuItem">
							<Setter Property="DockPanel.Dock" Value="Top"/>
							<Setter Property="Padding" Value="0,2,0,2"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
						</Trigger>
						<Trigger Property="IsSuspendingPopupAnimation" Value="True">
							<Setter Property="PopupAnimation" Value="None" TargetName="SubMenuPopup"/>
						</Trigger>
						<!-- If no Icon is present the we collapse the Icon Content -->
						<!--<Trigger Property="Icon" Value="{x:Null}">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
                        </Trigger>-->
						<!-- The GlyphPanel contains the CheckMark -->
						<Trigger Property="IsChecked" Value="True">
							<Setter Property="Visibility" Value="Visible" TargetName="GlyphPanel"/>
							<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
						</Trigger>
						<!-- Using the system colors for the Menu Highlight and IsEnabled-->
						<!--<Trigger Property="IsHighlighted" Value="True">
                            <Setter Property="Background" Value="LightGray" TargetName="Border"/>
                            <Setter Property="Foreground" Value="Black"/>
                        </Trigger>-->
						<!--<Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Foreground" Value="LightGray"/>
                        </Trigger>-->
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>